When a user is entering data into a layout, the following phases of the execution cycle are executed:  Before,  During,  After, Outside Call,  Activated, and  Deactivated.
•  Before: Occurs before the layout is displayed. It is used, for example, to test whether the record is a new record or an existing record. (Recall that a layout may be used both for adding new records or modifying existing records.) The Before phase is also used to initialize variables and display default values in fields.
•  During: Occurs during data entry each time data is changed or an active object is used.
•  After: Occurs after the record has been accepted.
• Outside Call: Occurs during data entry if a call is made from another process.
•  Deactivated: Occurs during data entry each time the window containing the layout or script is sent to the back or is not the frontmost window anymore. A deactivated phase will occur if an alert message or the debugger is displayed.
•  Activated: Occurs during data entry each time the window containing the layout or script becomes the frontmost window.
The  During phase occurs when the user does something to the layout. Some of the user actions that can cause a During phase are the following:
• Changing data in a field or variable and leaving the field or variable
• Clicking a button
• Manipulating a thermometer, ruler, or dial
• Choosing an item from a menu
• Selecting an item from a scrollable area
• Choosing an item from a pop-up menu
• Pressing an assigned key combination
• Clicking an external area
• Working in an included area
The  During phase is typically used for tasks such as validating data, formatting entered data, managing data in related files, and monitoring and responding to the selection of controls.
The  After phase takes place after the user has modified and accepted a record. It will not occur if the user cancels the record.